SensibillSDK

object SensibillSDK : SensibillCore

SensibillSDK.kt

Acts as main authentication point for Sensibill SDK. Contains main functionality to initialize, start and release SDK

  • How to use the library:

InitializationBuilder initializerBuilder = new InitializationBuilder(...)
SensibillSDK.INSTANCE.initialize(initializerBuilder.build());

SensibillSDK.INSTANCE.start(userIdentifier, new Startup() {
void onSDKStarted() {
// Start any activity related to the library
}

void onSDKFailed(LoginError loginError, String errorMessage) {
// SDK failed to start. Unable to use library
}

});

Functions

addReceiptDataObserver
Link copied to clipboard
open override fun addReceiptDataObserver(receiptDataObserver: ReceiptDataObserver): Boolean
Adds a ReceiptDataObserver to be notified when receipt events occur.
addSDKErrorObserver
Link copied to clipboard
open override fun addSDKErrorObserver(sdkErrorObserver: SDKErrorObserver): Boolean
Adds an SDKErrorObserver to be notified when the TokenProvider encounters an error.
addSDKLifecycleObserver
Link copied to clipboard
open override fun addSDKLifecycleObserver(sdkLifecycleObserver: SDKLifecycleObserver): Boolean
Adds a SDKLifecycleObserver to be notified when lifecycle events occur.
addTransactionDataObserver
Link copied to clipboard
open override fun addTransactionDataObserver(transactionDataObserver: TransactionDataObserver): Boolean
Adds a TransactionDataObserver to be notified when transaction events occur.
getInstance
Link copied to clipboard
fun getInstance(): SensibillSDK
Backwards compatibility method to mimic Java Singleton reference usage
getSession
Link copied to clipboard
open override fun getSession(): Session?
Get the current user session information.
getState
Link copied to clipboard
open override fun getState(): CoreState
Get the current initialization/running state of the SDK
getUserIdentifier
Link copied to clipboard
open override fun getUserIdentifier(): String?
Get the user identifier of the currently authenticated userThis method should only be called after start.
initialize
Link copied to clipboard
open override fun initialize(initializer: Initializer)
Perform necessary initialization that must be done before using the SDK.
open override fun initialize(initializer: Initializer, listener: SDKInitializeListener)
Perform necessary initialization that must be done before using the SDK.
release
Link copied to clipboard
open override fun release()
Shut down and release all resources being used by the SDK
removeReceiptDataObserver
Link copied to clipboard
open override fun removeReceiptDataObserver(receiptDataObserver: ReceiptDataObserver): Boolean
Removes a ReceiptDataObserver from the list of observers
removeSDKErrorObserver
Link copied to clipboard
open override fun removeSDKErrorObserver(sdkErrorObserver: SDKErrorObserver): Boolean
Removes a SDKErrorObserver from the list of observers
removeSDKLifecycleObserver
Link copied to clipboard
open override fun removeSDKLifecycleObserver(sdkLifecycleObserver: SDKLifecycleObserver): Boolean
Removes a SDKLifecycleObserver from the list of observers
removeTransactionDataObserver
Link copied to clipboard
open override fun removeTransactionDataObserver(transactionDataObserver: TransactionDataObserver): Boolean
Removes a TransactionDataObserver from the list of observers
restore
Link copied to clipboard
open override fun restore(context: Context): Boolean
Attempt to restore the active state of the SDK.
open override fun restore(context: Context, listener: SDKRestoreListener)
Attempt to restore the active state of the SDK.
start
Link copied to clipboard
open override fun start(userIdentifier: String, callBack: SDKStartup)
Login to the library with the params retrieved by the Oauth provider.